Fixing build model script for more robustness and fixing komodo media and fusion scripts