Add JSON support for datasets and rulesets (alongside YAML).
Minor fixes to improve compatibility with Linux.