Added profile support and fixed another path relative bug.