integrated changes from Samuel GĂ©lineau which implement .keepme files inside directories to fix basically all problems with directories.