Adjust index used to check image links in test_navigation_buttons_for_image_viewer to be more resistant to static path changes

Another failure due to the static path changes. By changing the index used to just be -1, if the prefixed path changes the test can still pass as the index is only dependent on what is at the end of the path and not what is at the beginning. I tested this change on dev, stage, and prod on firefox with no failures.