Answer:
There is a distinction between where the script exists, given by __file__, and the current working directory (usually the place from which the script was invoked), given by os.getcwd(). It is not entirely clear from the question wording which one was intended, although they are often the same.