fix TypeError: Arguments to path.resolve must be strings

Arguments must be strings. In v0.8, non-string arguments were silently
ignored. In v0.10 and up, an exception is thrown.