Added doc, build_doc and clean_doc targets, modified paths handling.