Make the migrate-hosts script work on OS X

refs #7398