fix pl.py to handle more corner cases
fix pl.py to handle more corner cases

yunqu/PYNQ,yunqu/PYNQ,cathalmccabe/PYNQ,yunqu/PYNQ,yunqu/PYNQ,schelleg/PYNQ,cathalmccabe/PYNQ,yunqu/PYNQ,schelleg/PYNQ,Xilinx/PYNQ,schelleg/PYNQ,cathalmccabe/PYNQ,schelleg/PYNQ,schelleg/PYNQ,cathalmccabe/PYNQ,Xilinx/PYNQ,Xilinx/PYNQ,cathalmccabe/PYNQ,Xilinx/PYNQ,Xilinx/PYNQ,cathalmccabe/PYNQ