various fixes

- use IfModule statements to prevent duplicate module declarations
- fix userDir directive typo
Merge branch 'issues/dhathorn_updates'