Do not modify global Specification.dirs during installation.

This was originally proposed as #442. In that time, it doesn't worked, just test case exercising this behavior was added. Later, I submitted #452, which included this patch again, but was accepted just partially, since it was not mergeable at that time. So this is my 3rd attempt to propose this patch. The testsuite passed and it works according to my testing (note that we are using similar patch in Fedora since February without any issues).