Support Puppet's embedded ruby and improve the which command usage