Add support for --lang and --functions for tests.sh
Fix Ruby/test.sh script to work with new style test