Fixing os.remove errors