Allow parameters with spaces to be passed to the main class

I am currently calling the generated script like this:
script --option "foo bar"
WIthout the quotes around $@ it will end up being 3 parameters once it reaches the main class (--option, foo, bar).