Removed rmdir because apparently it is never called when unlink is supplied.