This function expands system paths (the non-absolute paths become absolute)
and replaces the environment variables (e.g,
with their values.
file path to expand. Potentially any string
Expanded path or untouched string
Most importantly strings that are not system paths are returned untouched
string = "https://www.r-project.org/" .expandPath(string)#>  "https://www.r-project.org/"path = "$HOME/my/path/string.txt" .expandPath(path)#>  "/Users/mstolarczyk/my/path/string.txt"