As a footnote, see under Posix file paths in the AppleScript documentation here:
Note that:
- the
$HOME
and~
prefixes are understood (and automatically expanded, given the right quote marks) in Terminal.app (the Bash shell), but are not part of AppleScript. - The
Macintosh HD
prefix is recognised by the legacy colon-separated file path references (also described in the link above), but is not part of the default (forward slash delimited) Posix file path references.