Silence error when trying to remove a file that is a directory