refactoring, improved logic for determination whether files should be
racked, other improvements

- refactor and enhance logic to determine if a view should be in FileRack
- catch error if file couldn't be deleted
- set_scratch(False) when removing a view from FileRack
- when opening an already opened FileRack-File, close and reopen it in the
  active window