added function get_module_name & test

This function allows to retrieve the module name by using the Puppetfile as source of truth instead of assuming the module name matches the repository name.
This is also passing the right module name to the r10k_deploy_module function when updating an existing branch (puppet environment).

here, the test should be testing for equality, not simply if it's included in the overall string. This could cause things to pass that shouldn't. A more correct test would be like so:

expect(contents).to eq(mod2)