# end of bup preamble
from __future__ import absolute_import, print_function
+
+# Intentionally replace the dirname "$0" that python prepends
+import os, sys
+sys.path[0] = os.path.dirname(os.path.realpath(__file__)) + '/..'
+
from binascii import hexlify
from errno import EACCES
from io import BytesIO
-import math, os, stat, sys, time
-
-sys.path[:0] = [os.path.dirname(os.path.realpath(__file__)) + '/..']
+import math, stat, time
from bup import compat, hashsplit, git, options, index, client, metadata
from bup import hlinkdb