Changed the rename plugin to rebase new keys to the cutpath

This pull request should fix the issue discussed in #156. A unit test is included and I did some basic tests with my installation. However, I had no time for extensive testing, so please have a look at it too. 

Currently the implementation uses the private function `char *keyNameGetOneLevel(const char *name, size_t *size);` (and so does yajl). This function is actually really useful and we might consider moving it to the public API.