Fix regular expression to work with standard GOPATH layout.
exit with error if cannot open file