last-working-dir working with spaces in dirnames

This commit should make the last-working-dir plugin work with directories that contain spaces (at least for me).