Fixed stupid bugs on removing non-empty directory