Adding on-the-fly script creation

Fixes: bug 1228130

Change-Id: I9edbd164b0e5d1906e835c3871bac8b47bc63bd9
Merge "Adding on-the-fly script creation"