Use environment's $GOPATH if set

My $GOPATH is different, the plugin fails to find imports with the existing logic. This patch checks if $GOPATH is set, if not reverts to the current way.