CORE-4462: Fixed the /secured/default-output-dir endpoint.

The switch to cheshire caused it to compare a keyword with a string,
which always returned false, incorrectly identifying a directory as a
file.

I changed the error map that gets returned so it has an error_code
field.