Add the open file dialog.

The dialog allow the user to open a file located outside of the project root path. This commit also migrates some actions from the controller to the state.