The main railway station in Budapest has been closed to stop refugees from travelling to Austria and Germany.