fixing generate script to account for multiple possible paths in protobuf
updating for v1.7