Incorporated changes from Niclas Hedhman as well as fixed a bug that was including "." on the class path twice. (FELIX-73)