Refactored getFilePath method to contao standard