wouldn't it be easier to just use `Environment.ExpandEnvironmentVariables` instead?