cleaned up publish script for stdin, noted host-mounted dirs