Refactor file selection ui logic into separate directive.

Removed clunky ipc calls to open files for parsing and moved duplicated file selection UI into separate partial.