Provide escape value for string literals beginning with tilde
Fix lang._homedir_expand (forgotten cls argument after refactoring)