RAIL FENCE CIPHER (transposition)

The plain text is written in a zig zag (diagonal) way on a number of rails
(rows), then read row by row to get the cipher text. Letters are only
rearranged, not changed.

Rule: row goes 0,1,2,...,rails-1 then back ...,1,0 and repeats.
Key = number of rails.

Steps (encryption):
1. Make empty rows equal to number of rails.
2. Put each letter in current row, move down; at last row move up; at first row move down.
3. Join all the rows one after another = cipher text.

Steps (decryption):
1. Build the same zig zag row pattern for the cipher length.
2. Fill the cipher letters row by row into those positions.
3. Read the positions in normal order to get plain text.

Example (3 rails): HELLOWORLD
 H . . . O . . . L .
 . E . L . W . R . D
 . . L . . . O . . .
Cipher = HOLELWRDLO
