python script to check if file/dir exists, if exist, stat it.