Add a --version option to xwalk_apkgen
Fix functional tests by adding App.version numbers
Add a check that os.tmpdir is a function

The issue at the moment is that os.tmpdir seems to exist
in node 0.8.26, but isn't a function. So test whether os.tmpdir
is a function before attempting to invoke it.