[be-script] refactor script and add options for batch usage

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>