Any person who has been committed on a criminal charge may be brought before a judge on a writ of habeas corpus, if the writ issues out of the proper court.