Set PYTHONUNBUFFERED environment variable

https://docs.python.org/2/using/cmdline.html#envvar-PYTHONUNBUFFERED

Like a lot of things (hi Ruby) Python buffers stdout. This is annoying
in development because it means you might not see the output you're
looking for.

In production-like environments, we should not be putting anything on
stdout that would cause this to be an issue.
Move helpers into their own file

Improve the testing of the requires_authentication decorator. There's
no need to test the decorator in every place that it's used if we
can just test once that it's working.
Add an /upload-data endpoint

The upload endpoint should list the data sets that the user has
access to, and provide a form for each one to allow the user to
upload data.
Make flash messages line up

I don't think .container-fluid should be defined in each of the views.
Upload POST work in progress
Fix second test
Tidy up for pep8
Working flash tests for two http errors