Added filetype handlers for pdf.erb, and small bug fix.