main: remove statically assigned array

Utilized snprintf and malloc to dynamically allocate script variable.

Closes #21
Merge remote-tracking branch 'Lokaltog/develop' into wayland