Fix traits issue for PHP 5.4.11 onwards and incorrect resolution for filename "-"