Fixing bug in tilde handling for paths