Fix a few bugs in tools.py

There were several cases where terminal() was called, but now that those
functions have been moved to be methods of the Tools class,
self.terminal() should be called instead.
Add Andrew Moffat's sh.py library (MIT license)

We'll be using sh.py as a replacement for the subprocess module in the
standard library. Rather than mess around with asking the end users of
Rapuma to install it on their systems, since sh.py is a one-file library,
we'll just install it alongside the Rapuma libraries.
Various bugfixes

This commit fixes all the places where the PyDev plugin for Eclipse
could find mistakes, e.g. "undefined variable" errors. Usually they were
the cause of previous refactoring: such-and-such a function had been
renamed, or moved into class XYZ, but one or two cases of calling that
function hadn't been updated. Those should be fixed now.
A few typo and whitespaces fixes
Improve loop by using enumerate()

This is the kind of situation enumerate() was written for; let's use it.
Merge branch 'master' into personal/rmunn
Ensure rapuma can run from anywhere

When rapuma is started as "scripts/rapuma" from the top folder of the
Git repo, the logic for finding rapumaBase fails, because it's expecting
two directory parts in sys.argv[0] and only finding one. Changing the
logic to instead use os.path.join(dir, '..') instead of the second
dirname() call will work even in the "scripts/rapuma" case.
Merge branch 'master' into personal/rmunn
Add bibbook.py with a bunch of Bible book info

This file was taken from the TW-on-Linux project. Its numeric codes for
Bible books include the Aprocrypha, and have Matthew starting at 60. It
would be straightforward to modify them to match what Paratext uses,
though.
Merge branch 'master' into personal/rmunn
Revert "Ensure rapuma can run from anywhere"

This reverts commit f04ac1234abe1a00548a4f01eb6f59de8f1e605f.
We will instead use the abspath() approach found on master.
Merge branch 'master' into personal/rmunn

Conflicts:
	scripts/rapuma
Change system.ini version *back* to master version

We only run the update_version script when we're committing to master,
and not at any other time -- so let's make sure that we don't change the
system version when we're working on other branches.
Merge branch 'personal/dennis' into personal/rmunn

Conflicts:
	lib/rapuma/core/paratext.py
	lib/rapuma/core/proj_data.py
	lib/rapuma/core/proj_process.py
	lib/rapuma/core/user_config.py
	lib/rapuma/manager/text.py
	lib/rapuma/project/proj_maps.py
	lib/rapuma/project/proj_setup.py
Typo fix: resouce -> resource

Since this occurs in config files as well, we need to check config files
for the old setting and convert it to the correct spelling. At some
point in the future when we're confident that all config files with the
old spelling have been converted, that code may be able to be removed.
Fix bug making brand-new config file

If we happened to be making a brand-new config file even though the
default projects directory already existed, the "projects" value in the
"Resources" section was never being written. Fixed now.
Use proper default values for user config

The config/rapuma.xml file was being read but never used, and this was
causing some problems for brand-new configurations (e.g., new
installations of Rapuma). Fixed now.

Also improved the getConfigValue() function so it no longer needs to
call eval(), which could be a security hole. (Someone could edit the
rapuma.xml file to contain, say, the text "None; subprocess.call('rm
-rf $HOME', shell=True)" and the hapless Rapuma user would wipe out his
whole home directory when next he ran Rapuma. Not good.) Now it no
longer relies on eval(), and is thus much safer. (And more Pythonic.)
Typo fix: cannon -> canon

Several code changes but no config file changes, so this should not need
any code to update the config file with new keys.
Fix writeToLog format codes

The writeToLog function is supposed to replace codes like <<1>> with
values passed in as args, but it wasn't doing so because of a wrong sign
in the text replace. Fixed now.
Merge branch 'personal/rmunn' into personal/dennis

Conflicts:
	lib/rapuma/core/user_config.py