Better replace so it is possible to use {directory} several times