Fixed attribute replacement when no path was specified

Previously replacing a class -- e.g. class="debug" with a value of
"production" would result in class="productiondebug". It will now
replace debug with production as expected and will only preserve the
original asset name if the forward slash character is found in the
block asset.