Clean up file selector view

Add tests, remove unused stuff.

To aid with testing, inject prompt as a dependency.