Error Handling Improvements

The scripts are now somewhat more resilient against missing arguments
expected from the QUERY_STRING. Returning no results for a lookup with
now create a visible error.