fix `delete_folder()` impl for Linux/OSX