fixed creation of shards mapping and added error handling
Merge branch 'pregel' of https://github.com/triAGENS/ArangoDB into pregel