I actually got stalled for a while, too. You need to go hunting around for a gate to continue on to the next world, once you are back at the cabin when you complete your task. The ghost kept zapping me back to the cabin so you start your search from there again. You get different masks from each world you go to. You need to retrace your steps through already visited worlds, or you make sure to go back once you've gotten most of them to get you through places you weren't able to access on your first visit.
Big tip...you have to fight all opponents because they give up items needed to get the required count to go through some of the barrier gates. You won't always collect them lying around, so you do need to go through the fighting sequences

Items listing will tell you what the total count of each item is. You need to collect them all before you can finish the game.
