add ruby version check; fix sys name conflict
move bulk of generated files to a subdirectory, in style of php generator