expand user directory, for wdir and log parameters