fix for reading hosts file

On my osx, use a+ to open a file couldn't read any content, use r for
generally.
Merge remote-tracking branch 'LYY/master' into develop

fix #3
update script