Ok, but then "if(is_file($path . 'screenshot.png'))" is wrong.
It should check t3lib_extMgm::extPath($this->getExtensionName()) . 'Resources/Public/Images/screenshot.png';