Use File.basename to strip extension. Nice one.
Use Dir.mktmpdir for the test directory
Merge doc updates