RCG: cherry pick two items from master into branch-4.2
$bdroot is a reference to the current mdl file. It's used only in newer (>=2017) matlab versions.
post process script changed to replace $bdroot with current file name, rather than truncated system name. Also, a single typo was fixed.
- fix deep link problems that cause infinite library reference recursion when parsing mdl files.