Cleaned up code in razor tasks to use new function in asm/utils

DO NOT MERGE until after 8.0.1.
MERGE WITH: https://github.com/dell-asm/asm-deployer/pull/658