Fix crash when subdirs present in source

If your `--source` directory has subdirectories then doxx will crash because it tries to write equivalent files in `--target` without first creating the subdirectory.  For example:

    $ doxx --source ./lib --target ./docs/api

    fs.js:338
      return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                     ^
    Error: ENOENT, no such file or directory './docs/api/meta/get_meta.js.html'

Since it worked in dox-foundation I thought I'd check how that does it and I've found the code and modified it to work with doxx.

PS great work on doxx it looks fantastic.