Re-order option processing to allow JSON responses to set their status.
Merge pull request #18 from ndemonner/json-response-status

Re-order option processing to allow JSON responses to set their status.