Fix mkdirp.

We need to copy the input string of mkdirp to be able to maintain an external
API that accepts const pointers.
Improve .travis.yml to build with gcc and clang in parallel.