Fixes for XStream serialisation issues

- Fix Map serialisation with invalid characters for Map keys