Fix a problem where using a non-string value for path caused all files to be deleted.