FACES-1510 fixed file/folder cleanup, dead permissions code, and cancel button for file upload