Moving file dialog code into literate CoffeeScript