Added support for absolute paths, and other fixes.