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
Merge pull request #67 from plukevdh/master

Fix for use with sinatra-cache