added error middleware, fix broken error res' and uuid usage
Merge pull request #26 from adamshih/update

(#25) Fix error response plus uuids to pass PouchDB tests