fixed problem with dollar symbols in target path

see issue #72 - usage of replace function disallows dollar signs in paths