[#1] Images with empty path are now ignored.
[#3] Code from [#3] formatted to match PEP-8 guidelines.