Fix processing of file paths with tilde (~), .., and .