Clean up perlbrew logic and allow for proper expansion