Ability to specify options on per-directory basis.

Closes #1401.