Correct hostlist function wrappers for use with OS X

Old functions were completely wrong, but not used on most systems