This patch removes the use of expanduser and replaces it with type 'path'. This patch is related to #12263