Fixed image links that broke due to a regexp typo.

Links that ended in jpeg or png used to break and return wrong urls.