Add runtests.
More robust definition of pwd.
Add build script.
Add gitignore.
Update build instructions.