Fixes discovered through running on CentOS

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #21 from djs55/fix-on-centos-again

Fixes discovered through running on CentOS