adds check if path exists (test excluded because of creepy phpspec)