Fixing directory cleanup on linux