Figure out required ports and update the metadata accordingly

Make sure that the connection depth is 2

Modify the script xml rep. to include @required to input ports
Merge pull request #36 from daisy-consortium/required_ports