Silence "print() on closed filehandle" warnings

Trivial nit: If $PERLBREW_ROOT/perls/perl-*.*.*/.version is read-only (e.g.,
a root-owned, system-wide directory like "/opt/perlbrew"), don't try to write
to it.
Merge pull request #403 from DabeDotCom/fix_read_only_version_file

Silence "print() on closed filehandle" warnings