it actually removes the file, right? why would dirname remove a directory?