Rebase this to latest YCM and I'll merge it in. Note that output dir paths have changed.