asterisk - fix preg_match and directory links