Replaced JSONResponse(404) with abort(404)

When a 404 was encountered, the JSONResponse object was trying to be
marshalled. The abort function, on the other hand, raises an Exception,
aborting the execution of the script.