Removed usage of directory local variables.

See #12 and #42.