Use the slice to get the lastString.
The split().pop() doesn't return the right lastString if the target is `source`/`source`_out.
Add mkdirp;Add testcase for `src`_out/`src` and `src`/`src`_out