Python script to scan files and return in json format