added test to expose #238,  refs #238
Fixed tests, rewriting is now correct for included files fixes #238
fixed error in including custom css refs: #239
fixes #238 for real this time. Previous fix's test did not cover file paths, and failed on these. Url rewriting for urls in included content now works properly