Remove calls to FileUtils.cd

Remove calls to FileUtils.cd and replace relative paths with absolute
ones - fixes a race condition when multiple threads are trying to
create gears at the same time.