Use expand_path to allow paths to be specified with ~.
(couldn't find something that allows allows ENV variables to be used, which would have been nicer)