Please change toCSS() so it takes custom output file path and make it produce the output with correct relative url()s.
Currently its producing urls relative to the source less file, whereas it should incorporate the intended location of css to be generated.