fixed regexp for directives pattern, to match relative paths, tests also updated