Add a preview url function used by D4239.

Test Plan: see D4239

Reviewers: alpert

Reviewed By: alpert

CC: csilvers

Differential Revision: http://phabricator.khanacademy.org/D4241