cmdmod: `if`, not `elif`; CWD validity check shouldn't be Windows-only