Fixed warning message when trying to remove directory