Move address increment out of conversion statement in encryption.

This eliminates the "unsequenced modification and access to" warning
from clang and technically makes the code safer.
Make change_directory dir parameter constant.

This allows dirnames to be passed as constant strings without
the compiler throwing declaration warnings.