Externals PRs: A Few modifications to make it work with jenkins

Please checkout cmsdist and pkgtools only if the are not already there. Do not change the current behaviour of the script.