fix #177, add a lock file for n

before the version installed, touch a file named `n.lock` in version directory, and util the version has been installed/downloaded locally, remove the file.

Then for that checking function, just check the n.lock of the corresponding version directory is existed.
/cc @tjwebb
Also, TJ writes `]] ;` (with a space). I'd prefer to keep style consistent. I prefer actually having no space, so feel free to change other occurrences in a separate commit if you feel the need.