OSX: Bug fixes for canceling open/save panels and refreshing/removing folders.

- Fixed Cancel button in all NSOpenPanel/NSSavePanels.
- Fixed bugs related to removing and refreshing folders in
LibraryPreferences.