split nand.c into nand/{core,fileio,tcl}.c