Fix Travis setup script
Fix issues with search and/or couchdb misses when fetching a resource