BAC-895: fixed purging of site and user css/js. 

Previous fix was not working in prod due to module loading origin checks.  Also cleaned up use of global vars (it was not using the right one) and fixed the regex because it wasn't working with css urls.   This is a P3 but I want to get it into this weeks release.  Will merge tomorrow morning.