Share dir

Introduces and uses share_dir global config option. Resolves #628.