Implemented actual code for sdmc_stat().
check for directory in stat too and set st_mode appropriately
allow user configurable stack