Merge pull request #8 from einhverfr/import_double_render

Avoiding double render after import on failure
Fixes permission denied errors due to locking requirements
Fixing gl modification
Merge pull request #80 from einhverfr/lock_batch_function

Lock batch function