Update install.sh

Added checks for existing files and directories, fixed locale issue for MacOSX.