Move config file parsing into gitdata module

While testing concurrent writes, later web2py requests sometimes report
that the config file it empty. Moving that logic into a module fixed the
problem. Now the config file is only parsed once on startup instead of
on every request.
Allow test_valid_study_put.py to take a parameter to make it easier to test concurrent writes
Use config.readfp() instead of read() since there is only one config file to read and an exception should be raised if it cannot be read
Get concurrent writes working

It turns out that we cannot look for our config file based on the absolute
path of "." and instead we need to use request.env.web2py_path . When one
write process is in progress and another comes in, the CWD != to the root
of web2py as it usually is, until the git operations are done and gitdata
restores the original CWD.
Fix a bug where write_study branched from the currently-checked out branch instead of master and add a test