Added directory checks; image export; basic pdf export