Adding JSON error handling and fixing location headers.
Merge pull request #7 from ellisonbg/zsailer-multidir

Adding JSON error handling and fixing location headers.