ScriptTask refactoring and fwtool improvements

1. ScriptTask now is a list of commands (backwards incompatible).
2. fwtool improvements.