Removes the usage of expanduser because it is automatically handed by specifying a type of 'path'. Related to #12263