fix fix_etc_hosts to work on both linux and mac os x