Slightly modified version to handle edge-cases.

...ded method for inputing fill attribute if one does not exist in the target SVG.