Expands tildes for dat import case. Fixes #239