Also is this file you are loading the images, your root file you are executing? IF this is a module imported to another file, and the images are in the same directory as this module, then it is going to fail. Example here (very last paragraph).
Recommended Tutorials: