Gravar-mail: Artefacts in statistical analyses of network motifs: general framework and application to metabolic networks