- chdir() to the directory the input file is located so that it finds relative image urls
- show the progress in somewhat better way
- removed the stderr() function and debug output