The program run like a cli

Add in cli checks to determined if the user putting the correct format.

Change os.path.exists to os.path.dir to check for directory if it is
exist rather than checking both file and directory.

The user can either put relative path or full path. The output will be
in full path.