Update how we get the hostname to support CentOS kitchen tests

Hi, I made this change after noticing that Socket.gethostname for CentOS would return long hostnames such as: "load-balancer-centos-64.vagrantup.com". However, the tags.json files would reside in load-balancer-centos-64. This affects any tests, in any cookbook, that uses Socket.gethostname. I checked that this does not break Ubuntu 12.04 tests.