img: Fix extracting leaf survey name for title
When there are three or more levels of survey, we were taking everything after the first dot rather than everything after the last dot.