Cherry-pick kmx's "properly work if installed in a dir spaces in its name"