perl: modify patch for better purity

This probably solves problems on some platforms that expose /usr and
/lib during build, see #386.
perl: enable doCheck, almost all tests work for me
Merge pull request #421 from vcunat/p/perl

Perl