correct delete() bug to allow filepaths