Fix a bug when passing file path.
Implement pdf_preview_gen.sh for Linux