move PRIV_DIR macro to edfs_utils.erl and cleanup code