Fixes for windows

- Fix compilation
- Fix dialog not remember favorites
- Do not allow making an absolute path relative to the project path if
the project path is empty
- Fix a crash on exit