Add a test for fix of issue #17098
Issue #17098: Be more stringent of setting __loader__ on early imported
modules. Also made test more rigorous.
merge
Issue #16256: OS X installer now sets correct permissions for doc directory.
Issue #16256: merge from 3.2