Substitute spaces for underscore in dictionary keys with spaces