* fixed incorrect dirname() result

Before fix the problem function dirname() always returns path passed in argument, and condition `dirname(__FILE__) == __FILE__` was always true.