Clean up file selector view

Add tests, remove unused stuff.

To aid with testing, inject prompt as a dependency.

Directly invoking a passed reference to window.prompt is illegal, so
wrap it in an anonymous passthrough function.