Consolidate environment.rb function to search lib\ folder.