Append extension in code rather than leave it to the server

This fixes problems where titles have a '.' in them