Save generated PDF in database instead of filesystem now

Changed where to save generated permit PDF. Now it is in the database