check if tests are run inside Mongoose repo

if so, copy already downloaded deps
Small refactoring of rebar script
Merge pull request #55 from esl/reuse-deps

check if tests are run inside Mongoose repo