Add trailing slash if necessary to target-dir

Add a trailing slash to the target dir if it's missing it in the fn `export-pages`.