Rename root function in settings

For some reason, django will not export lowercase names in the settings file,
so the root() function defined there cannot be used when
from django.conf import settings
is used. Renaming it to uppercase makes it available.
Refactor tests; beef up test_thumbnail_url

The test_thumbnail_url test needed to make sure the thumbnail wasn't
regenerated on subsequent calls.