Updated the photo search function

Updated photo search function to always supply JSON and to gracefully
fail if A. No JSON is supplied or B. there is an error with the search.
Updated error message to include the error from the API
Completed if loop with array for sorting the data
Completed basic search function and setup default parameters for this.
Modified test data