[CHANGE] Use with-statement.
[FIX] Expand user argument for directories.