add 9-9: find __doc__ in .py
add 9-13: use sys.argv and getopt module
add support of Mac; refactoring extname splitting method