Add a -d flag that allows parsing a directory instead of an import path

The -d flag takes precedence over an import path.

There are two reasons for adding a -d flag

- It makes editor integration easier. Every editor knows the directory
  of a given file, not all editors know the import path

- Being able to parse a directory avoids ambiguity when an import path
  exists in multiple GOPATHs (e.g. when working on someone else's
  package)