Fix #406 deprecated code

Fixes the deprecated warnings according to issue #406.

Note: I only fixed the code under 'lib' and not in '/lib/site/' as those modules are CPAN modules. Can't we just get recent versions from those from CPAN when deploying MisterHouse instead of keeping track of those in our own codebase?