fixing tab spacing, using stdout with flush, using urljoin