or should I be running the apex_epg_config.sql as:
SQL>@apex_epg_config.sql <Oracle home directory of WINDOWS> ?
I fixed this issue myself. At least on my computer, Oracle 12c with APEX 5 was just not getting installed properly. So I had to reformat my computer twice again(so far had to reformat it 4-5 times) and then install 11g after which installation of APEX 5 was successful.
I thought one of the experts here will be able to throw some light, but strangely there was no reply from any one. Anyways I am not saying that this is the correct answer, but for now this can be marked as closed.