The "resolve output to absolute path" step only rebuilt
"$OUTPUT_DIR/$(basename ...)", so ./slides.pdf stayed relative. The
script then cd's into a temp dir, Playwright writes the PDF there, and
the temp dir is deleted. The script prints "PDF exported successfully!"
and then fails on du under set -e, with no PDF produced. This is the
script's own documented example.
Resolve the output directory with cd + pwd, as the input path already
does, and add a stubbed regression test (no network or browser).
Signed-off-by: Wen <jwcastillo@gmail.com>
(cherry picked from commit f91c14749e)