Change working directory with glob().

Using user-defined variable, or absolute path isn't
safe, since glob() uses patterns.
Reduce path replication.
Check file type and permissions.
Wrong variable.
Check help file before reading.