fix for use with sinatra-cache

seeing an issue where sinatra-cache takes over the rendering path and
using `File.dirname` from the view is somewhere deep within the cache
gem root. this ensures we have the right path