How do I resolve a path with backpaths (..) in the image.filepath? I'm trying to find the directory where an image file for a slot texture is located.  It works fine for most paths, but when the paths are qualified with .. (to back up a directory) it will then crash when I try to use os.listdir.

So, for example, this works if the image path is straightforward (Windows only -- not interested in any other OS since this only runs for Windows):

V:\somepath\geo\this image.png

mypath = mtex_slot.texture.image.filepath
for filename in os.listdir(mypath)


but this fails if the image location includes backpathing:

V:\somepath\geo\..\textures\this image.png

where the directory structure where the file is located is:
V:\somepath\textures\this image.png

The image location works in Blender with back paths -- which is to say specifying it that way in the image path will correctly resolve.  But it will not resolve in the os.listdir function.  So is there a way to read this in Python, or must I parse it myself by writing my own backpath function?
Crap -- I have GOT to stop asking questions until I spend more hours looking for an answer.

Sorry, folks, but os.path.realpath(mypath) works for me.  Sigh.  Nothing to see here, move along.