Fix support for GOPATH with symlink in it.

- Refactor the code to remove globals.
- Rename functions and variables to make the code more readable.
- Densify code by using call in conditions.
- Add -verbose to help diagnose problems.
- Add support with symlinks in GOPATH.
- Add -extra to add a relative directory, for example 'third_party' with is
  useful to keep the repo clean.
- Change prefix in logger.