SharePoint 2013 – Accessing referenced file from is not allowed because the reference is outside of the App Web

Scenario I ran into this when deploying an event receiver that would update the master page of all sites (SPWeb objects) when activated in a particular site collection (SPSite object). Accessing referenced file from is not allowed because the reference is outside of the App Web. Problem The problem is described and resolved here:  http://mctalex.blogspot.com.au/2013/07/powershell-fix-for-app-master-problem.html.…