add custom dirname function.
add ramdisk file extraction