Fixed bug in OneHotFormatter and added test

@goodfeli