Implement ScriptablePath.

ScriptablePath implements a missing `path` module of JavaScript. It has
the same API with one of Node.js.