Sanitize paths before setting them

This adds a / to the beginning of a path if it doesn't have
it already, as well as folding sequences of / into a single one.
Fix escaping an object name

It would not work if the name contained newline characters.
Fix the dir cache's log parsing with escaped chars

It wasn't unescaping the names so a function to do it was
also added.
test: Add unit test for the character consistency

In the objects' paths.
Always unescape the value in the dir cache parsing
Store the metadata using quotes and fix tokenizer
Check if the key exists before removing metadata
Fix the unescapeObject function

There were problems to process the last character correctly.
test: Fix mistaken metadata test

It was trying to remove metadata from an unexisting path instead
of an unexisting metadata key.
test: Fix typos in some metadata test messages
test: Add coverage of non-ascii chars in metadata

As well as whitespace and empty keys.