Honour assets base url

Trying to fix this #19. Modified version of the solution from this PR #25.

@IgorTimoshenko - can you review this and check I've done the right thing? The tests now pass and I've also tried the code changes on a project I'm working on and it works as I would expect it to but I'm new to this bundle so would like your input.