Removing unecessary files and the directory they belong to