Fix error handling and add custom error pages for 404 and 500.
Merge pull request #6 from peterhil/develop

Fix error handling and add custom error pages for 404 and 500.