main: remove statically assigned array

Utilized snprintf and malloc to dynamically allocate script variable.

Closes #21