tools: handle paths like ~/ or $HOME/.

tilde should be located at the beginning of line.

Change-Id: I271ba5220da3c483838d1741d908755aee8e081e
Reviewed-on: https://go-review.googlesource.com/46430
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2 files changed