Add locking on rpm_repo creation

This commit enables locking on repo creation for the rpm packages that jenkins
builds, in order to avoid us colliding with other repo creations. We loop until
the lock is released. Repo-creation takes along the order of 1-2 seconds. It
also removes various places where single quotes would obvious double quote
escapes, to make the code a bit more readable.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>