Some improvements for import.sh

This pull request includes the following 2 improvements for import.sh.

- Remove the assumption that the current directory is the top directory. It enables us to call import.sh from other than the top directory, for example, by PATH search.
- Take care of Cygwin, that is Linux API layer for Win32, environment.

It is tested by Cygwin 1.7.25 and FreeBSD 9.1-STABLE.

If you want to split them, I will make 2 separated pull requests.