Fix zlib detection (CMake script).
Create missing parent directories before trying to save config files. Closes #26.